﻿using AspDotNet.Core7.First.Services;
using Microsoft.AspNetCore.Mvc;

namespace AspDotNet.Core7.First.Controllers
{
    public class DIController : Controller
    {
        TotalUsers totalUsers;
        //public DIController(TotalUsers totalUsers)
        //{
        //    this.totalUsers = totalUsers;
        //}      
        public DIController()
        {
        }
        
        public IActionResult Index()
        {
            ViewData["total"] = totalUsers.TUsers();
            return View();
        }
        
        public string Index1([FromServices] TotalUsers totalUsers)
        {
            return "asdfsda";
        }
    }
}
